#pragma once
#include "Stdafx.h"
#include "Vector3D.h"
#include "Logger.h"

namespace Pulpy
{
	class Object3D
	{
	private:
		float _Width;
		float _Height;
		float _Depth;
		float _Radius;
		bool _Solid;
		Vector3D<float> _Position;
	public:
		Object3D():_Width(0),_Height(0),_Depth(0),_Radius(0),_Solid(true) { }
		Object3D(float w, float h, float d, float r = 0, bool s = true):_Width(w),_Height(h),_Depth(d),_Radius(r),_Solid(s) { }
		~Object3D() { _Width = 0; _Height = 0; _Depth = 0; _Radius = 0; _Solid = false; }

		float getWidth() { return _Width; }
		void setWidth(float w) { _Width = w; }
		float getHeight() { return _Height; }
		void setHeight(float h) { _Height = h; }
		float getDepth() { return _Depth; }
		void setDepth(float d) { _Depth = d; }
		void setRadius(float r) { _Radius = r; }
		float getRadius() { return _Radius; }
		void setSolid(bool s) { _Solid = s; }
		bool getSolid() { return _Solid; }

		bool Contain(Object3D & ob);
		bool Contain(Vector3D<float> &v);
		bool Intersects(Object3D &ob);
		void setPosition(const Vector3D<float> &v) { _Position = v; }
		void setPosition(float x, float y, float z) { _Position = Vector3D<float>(x, y, z); }
		void move(float x, float y, float z) { _Position += Vector3D<float>(x, y, z); }
		void move(const Vector3D<float> &v) { _Position += v; }
		Vector3D<float> getPosition() { return _Position; }
	};
}